<?php

namespace app\index\controller;

use app\common\controller\AppCommon;
use app\service\CurdService;
use app\service\DiyLog;
use app\service\GeTuiService;
use app\service\Pay;
use app\service\WechatService;
use think\App;
use think\Controller;
use think\Db;
use think\migration\command\migrate\Breakpoint;

class Index extends Controller
{
    public function index()
    {
        return $this->redirect(url('/mall/home/index'));
    }

    public function test()
    {
        $table = 'demand';
        $table = 'bs_goods';
        $table = 'bs_upload_files_log';

        $res = (new CurdService())->run($table);exit('ok:'.time());

        $res = (new CurdService())::get_table_info($table);
        data_exit_json($res);
    }

    public function a()
    {
        $obj =  json_decode(file_get_contents(__DIR__.'/tmp.json'),true);
        $res = [];
        foreach ($obj as $k=>$v){
            if (stripos($v['name'],'.mp4') !==false){
                $res[] = str_replace(['- 学习急救更多资源-XH1080.com.mp4','更多资源-XH1080.com.mp4'],'',$v['name']);
            }
        }
        sort($res);
        print_r($res);
    }



}
